package com.borrow.jiemihua.mainUI.activity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.borrow.jiemihua.R;
import com.borrow.jiemihua.base.BaseActivity;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;
import org.xutils.view.annotation.ViewInject;
import org.xutils.x;

@ContentView(R.layout.activity_gold_gui_ze)
public class GoldGuiZeActivity extends BaseActivity {
    @ViewInject(R.id.tv_top_title)
    private TextView tv_top_title;

    @ViewInject(R.id.ll_hdfs_gz)
    private LinearLayout ll_hdfs_gz;
    @ViewInject(R.id.ll_qd_gz)
    private LinearLayout ll_qd_gz;
    @ViewInject(R.id.ll_yqhy_gz)
    private LinearLayout ll_yqhy_gz;
    @ViewInject(R.id.iv_right_img1)
    private ImageView iv_right_img1;
    @ViewInject(R.id.iv_right_img2)
    private ImageView iv_right_img2;
    @ViewInject(R.id.iv_right_img3)
    private ImageView iv_right_img3;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        x.view().inject(this);
        initData();
        initView();
    }

    @Override
    protected void initData() {
        tv_top_title.setText("积分规则");

    }

    @Override
    protected void initView() {

    }
    private boolean boo=true;
    @Event(value = {R.id.imgbtn_left,R.id.rl_hdfs,R.id.rl_qd,R.id.rl_yqhy}, type = View.OnClickListener.class)
    private void getEvent(View view) {
        Intent intent = null;
        switch (view.getId()) {
            case R.id.imgbtn_left:
                finish();
                break;
            case R.id.rl_hdfs:
                if(boo==true){
                    ll_hdfs_gz.setVisibility(View.VISIBLE);
                    ll_qd_gz.setVisibility(View.GONE);
                    ll_yqhy_gz.setVisibility(View.GONE);
                    iv_right_img1.setImageResource(R.drawable.me_icon_down);
                    boo=false;
                }else{
                    ll_hdfs_gz.setVisibility(View.GONE);
                    ll_qd_gz.setVisibility(View.GONE);
                    ll_yqhy_gz.setVisibility(View.GONE);
                    iv_right_img1.setImageResource(R.drawable.me_top_icon);
                    boo=true;
                }
                break;
            case R.id.rl_qd:
                if(boo==true){
                    ll_hdfs_gz.setVisibility(View.GONE);
                    ll_qd_gz.setVisibility(View.VISIBLE);
                    ll_yqhy_gz.setVisibility(View.GONE);
                    iv_right_img2.setImageResource(R.drawable.me_icon_down);
                    boo=false;
                }else{
                    ll_hdfs_gz.setVisibility(View.GONE);
                    ll_qd_gz.setVisibility(View.GONE);
                    ll_yqhy_gz.setVisibility(View.GONE);
                    iv_right_img2.setImageResource(R.drawable.me_top_icon);
                    boo=true;
                }
                break;
            case R.id.rl_yqhy:
                if(boo==true){
                    ll_hdfs_gz.setVisibility(View.GONE);
                    ll_qd_gz.setVisibility(View.GONE);
                    ll_yqhy_gz.setVisibility(View.VISIBLE);
                    iv_right_img3.setImageResource(R.drawable.me_icon_down);
                    boo=false;
                }else{
                    ll_hdfs_gz.setVisibility(View.GONE);
                    ll_qd_gz.setVisibility(View.GONE);
                    ll_yqhy_gz.setVisibility(View.GONE);
                    iv_right_img3.setImageResource(R.drawable.me_top_icon);
                    boo=true;
                }
                break;
            default:break;

        }
    }
}
